<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Model;


/**
 * App\Models\ItemPush
 *
 * @property int $id
 * @property int $itemid 商品ID
 * @property string $title
 * @property string $image
 * @property int $groupid
 * @property string $created_at
 * @property string $updated_at
 * @property-read \App\Models\ItemPushGroup $group
 * @property-read \App\Models\Item $item
 * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\ItemPush newModelQuery()
 * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\ItemPush newQuery()
 * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\ItemPush query()
 * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\ItemPush whereCreatedAt($value)
 * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\ItemPush whereGroupid($value)
 * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\ItemPush whereId($value)
 * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\ItemPush whereImage($value)
 * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\ItemPush whereItemid($value)
 * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\ItemPush whereTitle($value)
 * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\ItemPush whereUpdatedAt($value)
 * @mixin \Eloquent
 */
class ItemPush extends Model
{
    protected $table = 'item_push';
    protected $primaryKey = 'id';
    protected $guarded = ['id'];

    public $timestamps = false;

    /**
     * @return \Illuminate\Database\Eloquent\Relations\BelongsTo
     */
    public function item()
    {
        return $this->belongsTo(Item::class, 'itemid', 'itemid');
    }

    public function group()
    {
        return $this->belongsTo(ItemPushGroup::class, 'groupid', 'groupid');
    }
}
